#if defined _ncs_rpg_included
	#endinput
#endif
#define _ncs_rpg_included

#define CPrefix					"\x04[\x05NCS RPG\x04]\x01 %T"
#define MAX_SKILL_NAME_LENGTH	64
#define MAX_SKILL_DESC_LENGTH	256

#include <ncs_rpg_menu>
#include <colors>

forward RPG_OnSkillsRegister();

forward RPG_OnDBConnected();

forward RPG_OnClientLoaded(client);

native bool:IsValidPlayer(client, bool:alive = false, bool:bots = false);

native RegisterSkill(const String:shortname[], maxlevel, cost, icost);

native GetSkillCount();

native GetSkillShortname(skillid, String:buffer[], maxlen);

native GetSkillName(skillid, String:buffer[], maxlen, client = 0);

native GetSkillDesc(skillid, String:buffer[], maxlen, client = 0);

native GetSkillMaxLevel(skillid);

native GetSkillLevel(client, skillid);

native GetClientSkillCost(client, skillid);

native GetConfigValue(const String:key1[], const String:key2[], defvalue = 0);

native Float:GetConfigValueFloat(const String:key1[], const String:key2[], Float:defvalue = 0.0);

native bool:GetConfigValueString(const String:key1[], const String:key2[], String:value[], maxlength, const String:defvalue[] = "");

native GetLevel(client);

native GetXP(client);

native GetReqXP(client);

native GetCredits(client);

native SetLevel(client, level);

native SetXP(client, xp);

native SetCredits(client, credits);

native SetSkillLevel(client, skillid, level);

native SetMaxHP(client, amount);

native GetMaxHP(client);

native GetSkillCost(skillid, level = 0);

native ResetPlayer(client);

native Float:SetSpeed(client, Float:amount, bool:variable = true);

native Float:SetMaxSpeed(client, Float:amount);

native Float:GetSpeed(client);

native Float:GetMaxSpeed(client);

native Handle:SetFreeze(client, Float:time);

native Float:GetFreezeTime(client);

native SetColor(entity, r, g, b, a = -1);

native Float:SetSlow(client, Float:amount);

native Float:GetSlow(client);

native GetAlpha(client);

native GetActiveWeapon(client);

native bool:ShakePlayer(client, Float:flAmplitude, Float:time, Float:noise = 1.0);

// Damage --------------------------------------------------------------------------------------------------------------------
#define DMG_GENERIC			0
#define DMG_CRUSH			(1 << 0)
#define DMG_BULLET			(1 << 1)
#define DMG_SLASH			(1 << 2)
#define DMG_BURN			(1 << 3)
#define DMG_VEHICLE			(1 << 4)
#define DMG_FALL			(1 << 5)
#define DMG_BLAST			(1 << 6)
#define DMG_CLUB			(1 << 7)
#define DMG_SHOCK			(1 << 8)
#define DMG_SONIC			(1 << 9)
#define DMG_ENERGYBEAM		(1 << 10)
#define DMG_PREVENT_PHYSICS_FORCE	(1 << 11)
#define DMG_NEVERGIB		(1 << 12)
#define DMG_ALWAYSGIB		(1 << 13)
#define DMG_DROWN			(1 << 14)
#define DMG_TIMEBASED		(DMG_PARALYZE | DMG_NERVEGAS | DMG_POISON | DMG_RADIATION | DMG_DROWNRECOVER | DMG_ACID | DMG_SLOWBURN)
#define DMG_PARALYZE		(1 << 15)
#define DMG_NERVEGAS		(1 << 16)
#define DMG_POISON			(1 << 17)
#define DMG_RADIATION		(1 << 18)
#define DMG_DROWNRECOVER	(1 << 19)
#define DMG_ACID			(1 << 20)
#define DMG_SLOWBURN		(1 << 21)
#define DMG_REMOVENORAGDOLL	(1 << 22)
#define DMG_PHYSGUN			(1 << 23)
#define DMG_PLASMA			(1 << 24)
#define DMG_AIRBOAT			(1 << 25)
#define DMG_DISSOLVE		(1 << 26)
#define DMG_BLAST_SURFACE	(1 << 27)
#define DMG_DIRECT			(1 << 28)
#define DMG_BUCKSHOT		(1 << 29)

native DealDamage(victim, damage, attacker = -1, dmg_type = DMG_GENERIC, String:weapon[] = "");

public SharedPlugin:__pl_ncs_rpg = 
{
	name = "ncs_rpg",
	file = "ncs_rpg.smx",
#if defined REQUIRE_PLUGIN
	required = 1,
#else
	required = 0,
#endif
};

#if !defined REQUIRE_PLUGIN
public __pl_ncs_rpg_SetNTVOptional()
{
	MarkNativeAsOptional("RegisterSkill");
	MarkNativeAsOptional("GetSkillCount");
	MarkNativeAsOptional("GetSkillShortname");
	MarkNativeAsOptional("GetSkillName");
	MarkNativeAsOptional("GetSkillDesc");
	MarkNativeAsOptional("GetSkillMaxLevel");
	MarkNativeAsOptional("GetSkillCost");
	
	MarkNativeAsOptional("IsValidPlayer");
	MarkNativeAsOptional("GetLevel");
	MarkNativeAsOptional("GetXP");
	MarkNativeAsOptional("GetReqXP");
	MarkNativeAsOptional("GetCredits");
	MarkNativeAsOptional("GetSkillLevel");
	MarkNativeAsOptional("GetClientSkillCost");
	MarkNativeAsOptional("SetLevel");
	MarkNativeAsOptional("SetXP");
	MarkNativeAsOptional("SetCredits");
	MarkNativeAsOptional("SetSkillLevel");
	MarkNativeAsOptional("ResetPlayer");
	
	MarkNativeAsOptional("SetMaxHP");
	MarkNativeAsOptional("GetMaxHP");
	MarkNativeAsOptional("SetSpeed");
	MarkNativeAsOptional("GetSpeed");
	MarkNativeAsOptional("SetMaxSpeed");
	MarkNativeAsOptional("GetMaxSpeed");
	MarkNativeAsOptional("SetFreeze");
	MarkNativeAsOptional("GetFreezeTime");
	MarkNativeAsOptional("SetColor");
	MarkNativeAsOptional("SetSlow");
	MarkNativeAsOptional("GetSlow");
	MarkNativeAsOptional("GetAlpha");
	MarkNativeAsOptional("DealDamage");
	MarkNativeAsOptional("GetActiveWeapon");
	MarkNativeAsOptional("ShakePlayer");
	
	MarkNativeAsOptional("GetConfigValue");
	MarkNativeAsOptional("GetConfigValueFloat");
	MarkNativeAsOptional("GetConfigValueString");
}
#endif